<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/common/common.jsp"%>
<html>
<head>
    <meta charset="utf-8" />
    <title>厅干部平时考核管理系统</title>
    <script type="text/javascript" src="<c:url value='/resource/jxkh/js/views/dailyedit.js'/>" ></script>
    <script>
        function submitForm() {
            $("#index1").val(index1);
            $("#index2").val(index2);
            $("#index3").val(index3);
            //top.mask();
            $("#submit_form").ajaxSubmit({
                type: "post",
                dataType: "json",
                success: function (data) {
                    if (data.data.status == 1) {
                        showMessage("操作成功！");
                        window.setTimeout(function () {
                            var url = "";
                            if("${type}"=="1"){
                                url = "<c:url value='/jump/index1.html'/>";
                            }else if("${type}"=="2"){
                                url = "<c:url value='/jump/wdgz_rz.html'/>";
                            }
                            console.log(url);
                            var index = parent.layer.getFrameIndex(window.name);
                            parent.layer.close(index);
                          //  $('#ifrm_data', parent.document).attr("src", url);
                        }, 1000);
                    } else {
                        showMessage(data.data.body);
                    }
                },
                error: function () {
                    showMessage("失败！");
                }
            });
        }
        function initTable(){
            $.ajax({
                url:'/jxkh/worklog/dailyWorkInfo.json',
                type:'get',
                dataType:"json",
                async:false,
                data:{
                    workdate:"${workdate }"
                },
                success:function(data){
                    if(data.hasList){
                        if(data.list!=undefined&&data.list!=null&&data.list!=""){
                            $.each(data.list, function(i, item){
                                if(item.type=="1"){
                                    addWork(1,item.content,'',1);
                                }else if(item.type=="2"){
                                    addWork(2,item.content,'',1);
                                }else if(item.type=="3"){
                                    addWork(3,item.content,'',1);
                                }
                            });
                            addWork(3,'','31',2);
                            addWork(2,'','21',2);
                            addWork(1,'','11',2);
                        }
                    }
                }
            });
        }
    </script>
</head>
<body>
<div class="njga" style="overflow: auto;background: #fff;">
    <!--日历弹出框-->
    <div class="date_pop" id="date_pop" style="display: block;">
        <form action="<c:url value='/worklog/saveDaliywork.json'/>" method="post" id="submit_form">
            <input type="hidden" name="workdate" id="workdate" value="${workdate}"/>
            <input type="hidden" name="dbid" id="dbid" value="${data.dbid}"/>
            <input type="hidden" name="index1" id="index1" />
            <input type="hidden" name="index2" id="index2" />
            <input type="hidden" name="index3" id="index3" />
            <%--<input type="hidden" name = "content1" value="${content1}"/>
            <input type="hidden" name = "content2" value="${content2}"/>
            <input type="hidden" name = "content3" value="${content3}"/>--%>
            <div class="row_pop_row" id="workContent11">
                <div class="pop_lf">日常工作</div>
                <div class="pop_rt">
                    <div class="pop_rt_main pop_rt_main1">
                        <textarea rows="2" id="content11" name="content11"></textarea>
                    </div>
                </div>
                <div class="rili_add" id="icon11" ></div>
            </div>
            <div class="row_pop_row" id="workContent21">
                <div class="pop_lf">重点工作</div>
                <div class="pop_rt">
                    <div class="pop_rt_main pop_rt_main1">
                        <textarea rows="2" id="content21" name="content21"></textarea>
                    </div>
                </div>
                <div class="rili_add" id="icon21"  ></div>
            </div>
            <div class="row_pop_row" id="workContent31">
                <div class="pop_lf">交办工作</div>
                <div class="pop_rt">
                    <div class="pop_rt_main pop_rt_main1">
                        <textarea rows="2" id="content31" name="content31"></textarea>
                    </div>
                </div>
                <div class="rili_add" id="icon31" ></div>
            </div>
        </form>
    </div>
    <!--日历弹出框结束-->
</div>

</body>

</html>